"""
    考虑：创建线程？如何使用线程？

"""
import threading
from time import sleep

def download(n):
    # 模拟下载文件的操作
    images=['girl.jpg','boy.jpg','man.jpg']
    for image in images:
        print("{}正在下载".format(image))
        sleep(n)

def listenMusic(n):
    musics=["海底","大碗宽面","荷塘月色","青鸟"]
    for music in musics:
        print("正在听{}".format(music))
        sleep(n)

if __name__=="__main__":
    # 创建线程实例
    t1=threading.Thread(target=download,name="多线程1",args=(1,))
    t1.start()
    t2=threading.Thread(target=listenMusic,name="多线程2",args=(1,))
    t2.start()
    # m=1
    # while True:
    #     m+=1
    #     sleep(1.5)
    #     print(m)


